package main

import (
	"log"
	"net/http"
)

func main() {
	urls := []string{"https://news.ycombinator.com", "http://programming.reddit.com"}
	// START OMIT
	ch := make(chan *http.Response)
	for _, u := range urls {
		go func(url string) {
			resp, err := http.Get(url)
			if err != nil {
				log.Fatal(err)
			}
			ch <- resp
		}(u)
	}
	for i := 0; i < len(urls); i++ {
		resp := <-ch
		log.Printf("%q: %s", resp.Status, resp.Request.URL)
	}
	// STOP OMIT
}
